package com.itheima.upload.web.servlet;

import javax.servlet.ServletException;
import javax.servlet.http.*;
import java.io.IOException;
import java.io.PrintWriter;

public class test extends HttpServlet{
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        PrintWriter writer = resp.getWriter();
        Cookie[] cookies = req.getCookies();
        for (Cookie cookie :cookies){
            String name = cookie.getName();
            String value = cookie.getValue();
            System.out.println(name+"="+value);
        }

        writer.write("I LOVE YOU ");
    }
}
